In Delta Plc counter is a important instruction in PLC. in delta plc have two types of counter CNT is 16 bit Counter instruction. DCNTis 32 bit counter instruction. counter increment or decrement current value by 1 each time when input of counter is changed from OFF to ON. Counter assigned with counter number, preset value. counter number like C0, C1 C2 etc. counter number also have different type which depend on processor. for example if you have ES/EX/EC Series CPU counter
CNT is 16 bit counter in delta plc. Counter Up is a incremental counter, counter current value is increment by 1 when input bit of counter is changed from off to ON. each change of input bit increment counter current value by 1. when counter current value reached counter preset value than counter done coil is set to ON. below is the example of latched and none latched counter in delta plc.
this example use ES/EX/EC Series CPU so C0 is non latched general purpose up counter and C127 is latched up counter. in this example preset value for both counter(C0 and C127) is constant value and X1 and X2 is input of counter and Y1 and Y2 is output coil of counter.C0 and C127 is Up counter when counter input(X1 and X2) is changed from Off to ON than counter value is increment by 1. counter increment it's current value until to reach preset value once preset value and counter current value is equal than counter coil(C0 and C127) is set to ON. once counter coil is set and input bit of counter is changed than counter current value not increment.
DCNT is a 32 bit counter in delta plc. when input of DCNT instruction is set from OFF to ON, the Current value in the counter will count up (plus 1) or count down (minus 1) according to the modes set in special relay M1200 to M1234(any one).turned on any one relay(M1200 to M1234) for use DCNT as decrement counter. Preset value is much larger than 16 bit counter and counter number(depend on plc type). in delta PLC 32 bit counter are up or down counter.
DCNT generally operates as 32 bit up counter if special relay M1200-M1234(any one) is turned OFF. below is the example of delta plc 32 bit up counter
DCNT use as Down or decrement counter when any special relay of M1200 to M1234(any one) is set to ON. down counter decrement current value by 1 when input of counter is changed from OFF to ON. Below is the example Of DCNT as decrement counter with special relay M1200.
Reset (RST) instruction reset counter current value to zero. below is the example of reset counter in delta plc. when input of reset instruction(RST) changed from OFF to ON than counter C0 reset counter value to zero.
using data register you can set your own preset value during program execution. declare data register to change preset value during program run. in below example D0 is a set preset value of counter C0.